package com.cc.mall.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.ToString;

import java.math.BigDecimal;
@ApiModel("购物项")
public class CartItem {
    /**
     * 商品详情id
     */
    @ApiModelProperty("商品详情id")
    private Long id;
    /**
     * 商品id
     */
    @ApiModelProperty("商品id")
    private Long pid;
    /**
     * 购物车中是否选中
     */
    @ApiModelProperty("购物车中是否选中")
    private Boolean check = true;

    public Boolean getCheck() {
        return check;
    }

    public void setCheck(Boolean check) {
        this.check = check;
    }
    /**
     * 大标题
     */
    @ApiModelProperty("大标题")
    private String bigTitle;
    /**
     * 小标题
     */
    @ApiModelProperty("小标题")
    private String smallTitle;
    /**
     * 价格
     */
    @ApiModelProperty("价格")
    private BigDecimal productPrice;
    /**
     * 规格
     */
    @ApiModelProperty("规格")
    private String productSize;
    /**
     * 默认照片src
     */
    @ApiModelProperty("默认照片")
    private String defaultPicture;
    /**
     * 商品详情的数量
     */
    @ApiModelProperty("商品详情的数量")
    private Integer count;
    /**
     * 商品详情的总价
     */
    @ApiModelProperty("商品详情的总价")
    private BigDecimal totalPrice;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getPid() {
        return pid;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }

    public String getBigTitle() {
        return bigTitle;
    }

    public void setBigTitle(String bigTitle) {
        this.bigTitle = bigTitle;
    }

    public String getSmallTitle() {
        return smallTitle;
    }

    public void setSmallTitle(String smallTitle) {
        this.smallTitle = smallTitle;
    }

    public BigDecimal getProductPrice() {
        return productPrice;
    }

    public void setProductPrice(BigDecimal productPrice) {
        this.productPrice = productPrice;
    }

    public String getProductSize() {
        return productSize;
    }

    public void setProductSize(String productSize) {
        this.productSize = productSize;
    }

    public String getDefaultPicture() {
        return defaultPicture;
    }

    public void setDefaultPicture(String defaultPicture) {
        this.defaultPicture = defaultPicture;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public BigDecimal getTotalPrice() {
        return this.productPrice.multiply(new BigDecimal(""+this.count));
    }

    public void setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
    }
}
